Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.

Conversation

bweick
Copy link
Contributor

@bweick bweick commented Jul 2, 2018

No description provided.

address[4] _addresses,
uint[5] _values
)
public
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Public? This seems like something that should be internal or private

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this one I struggled with, there's no harm in making it public but makes more sense for it to be internal. For expediency purposes I just made it public so that it could be tested. We haven't come up with a framework for testing internal functions I feel like.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these belong in a library of some sort as they don’t alter state. You could then test them by adding a mock contract, kind of how we had one for ExchangeOrderHandler

uint256 salt;
bytes32 orderHash;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some descriptions including what’s at each index of the array params?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah needed to add javadocs and comments

)
internal
{
require(_order.makerTokenAmount > 0 && _order.quantity > 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error message?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do

uint[5] _values
)
public
returns(bytes32)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in, looks like it should be either internal or belongs to some kind of IssuanceOrder library

);
}

function generateOrderHash(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, docs explaining these params

@coveralls
Copy link

coveralls commented Jul 2, 2018

Pull Request Test Coverage Report for Build 376

  • 11 of 11 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 358: 0.0%
Covered Lines: 172
Relevant Lines: 172

💛 - Coveralls

_order.makerTokenAmount > 0 && _order.quantity > 0,
INVALID_TOKEN_AMOUNTS
);
// Make sure the order hasn't expired
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: space when you work on this next


return recAddress == _signerAddress;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: space

@bweick bweick merged commit 77e992e into master Jul 3, 2018
@asoong asoong deleted the brian/validate_order_sig branch July 3, 2018 04:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants